<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Gradle 构建工具完全指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        /* 首字下沉效果 */
        .drop-cap::first-letter {
            float: left;
            font-size: 4rem;
            line-height: 3rem;
            padding-right: 0.5rem;
            margin-top: 0.5rem;
            font-weight: 700;
            color: #4f46e5;
            font-family: 'Noto Serif SC', serif;
        }
        
        /* 代码块美化 */
        pre {
            background: #1e293b;
            color: #e2e8f0;
            border-radius: 12px;
            padding: 1.5rem;
            overflow-x: auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            position: relative;
        }
        
        pre::before {
            content: attr(data-language);
            position: absolute;
            top: 0.5rem;
            right: 1rem;
            font-size: 0.75rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        /* 表格美化 */
        table {
            border-collapse: separate;
            border-spacing: 0;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        /* 卡片悬停效果 */
        .card-hover {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .card-hover:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }
        
        /* 渐变文字 */
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* 时间线样式 */
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -1px;
            top: 1.5rem;
            width: 3px;
            height: calc(100% + 2rem);
            background: linear-gradient(to bottom, #4f46e5, transparent);
        }
        
        .timeline-item:last-child::before {
            display: none;
        }
        
        /* 滚动动画 */
        .fade-in {
            opacity: 0;
            transform: translateY(20px);
            animation: fadeIn 0.6s ease-out forwards;
        }
        
        @keyframes fadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Mermaid 图表样式 */
        .mermaid {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
    </style>
</head>
<body>
    <!-- Hero 区域 -->
    <section class="relative overflow-hidden bg-gradient-to-br from-indigo-600 via-purple-600 to-pink-500 text-white">
        <div class="absolute inset-0 bg-black opacity-20"></div>
        <div class="relative container mx-auto px-6 py-24 text-center">
            <h1 class="text-5xl md:text-7xl font-bold mb-6 animate-pulse">
                <i class="fas fa-cogs mr-4"></i>Gradle
            </h1>
            <p class="text-2xl md:text-3xl mb-8 font-light">现代化构建自动化工具完全指南</p>
            <div class="flex justify-center space-x-8 text-lg">
                <div class="flex items-center">
                    <i class="fas fa-rocket mr-2"></i>
                    <span>极速构建</span>
                </div>
                <div class="flex items-center">
                    <i class="fas fa-puzzle-piece mr-2"></i>
                    <span>灵活扩展</span>
                </div>
                <div class="flex items-center">
                    <i class="fas fa-code mr-2"></i>
                    <span>DSL编程</span>
                </div>
            </div>
        </div>
        <div class="absolute bottom-0 left-0 right-0">
            <svg viewBox="0 0 1440 120" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M0 120L60 105C120 90 240 60 360 45C480 30 600 30 720 37.5C840 45 960 60 1080 67.5C1200 75 1320 75 1380 75L1440 75V120H1380C1320 120 1200 120 1080 120C960 120 840 120 720 120C600 120 480 120 360 120C240 120 120 120 60 120H0Z" fill="white"/>
            </svg>
        </div>
    </section>

    <!-- 主要内容区 -->
    <main class="container mx-auto px-6 py-12 max-w-6xl">
        
        <!-- 第一部分：Gradle简介 -->
        <section class="mb-16 fade-in">
            <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                <h2 class="text-4xl font-bold mb-8 gradient-text flex items-center">
                    <i class="fas fa-info-circle mr-4"></i>1. Gradle简介
                </h2>
                
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-2xl font-semibold mb-4 text-gray-800">
                            <i class="fas fa-question-circle mr-2 text-indigo-500"></i>Gradle是什么
                        </h3>
                        <p class="text-gray-600 leading-relaxed drop-cap">
                            Gradle是一款基于Apache Ant和Maven概念的开源构建自动化工具，采用Groovy/Kotlin DSL（领域特定语言）进行构建脚本编写。它结合了Ant的灵活性和Maven的约定优于配置理念，支持多语言项目构建，尤其擅长Java、Android、Kotlin等项目的构建管理。
                        </p>
                    </div>
                    
                    <div>
                        <h3 class="text-2xl font-semibold mb-4 text-gray-800">
                            <i class="fas fa-history mr-2 text-purple-500"></i>发展历史与现状
                        </h3>
                        <div class="space-y-3 relative pl-8">
                            <div class="timeline-item relative">
                                <div class="absolute left-0 top-1.5 w-3 h-3 bg-purple-500 rounded-full"></div>
                                <p class="text-gray-600"><strong>2007年：</strong>由Hans Dockter等人开始开发</p>
                            </div>
                            <div class="timeline-item relative">
                                <div class="absolute left-0 top-1.5 w-3 h-3 bg-purple-500 rounded-full"></div>
                                <p class="text-gray-600"><strong>2012年：</strong>成为Android官方构建工具</p>
                            </div>
                            <div class="timeline-item relative">
                                <div class="absolute left-0 top-1.5 w-3 h-3 bg-purple-500 rounded-full"></div>
                                <p class="text-gray-600"><strong>2019年：</strong>支持Kotlin DSL</p>
                            </div>
                            <div class="timeline-item relative">
                                <div class="absolute left-0 top-1.5 w-3 h-3 bg-purple-500 rounded-full"></div>
                                <p class="text-gray-600"><strong>2023年：</strong>最新稳定版为8.5，支持Java 21</p>
                            </div>
                            <div class="timeline-item relative">
                                <div class="absolute left-0 top-1.5 w-3 h-3 bg-purple-500 rounded-full"></div>
                                <p class="text-gray-600">目前已被Google、Netflix、LinkedIn等公司广泛采用</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="mt-8">
                    <h3 class="text-2xl font-semibold mb-6 text-gray-800">
                        <i class="fas fa-balance-scale mr-2 text-green-500"></i>与Maven/Ant对比优势
                    </h3>
                    <div class="overflow-hidden rounded-xl">
                        <table class="w-full">
                            <thead class="bg-gradient-to-r from-indigo-500 to-purple-600 text-white">
                                <tr>
                                    <th class="px-6 py-4 text-left">特性</th>
                                    <th class="px-6 py-4 text-left">Gradle</th>
                                    <th class="px-6 py-4 text-left">Maven</th>
                                    <th class="px-6 py-4 text-left">Ant</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white">
                                <tr class="border-b hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">构建语言</td>
                                    <td class="px-6 py-4 text-green-600 font-semibold">Groovy/Kotlin DSL</td>
                                    <td class="px-6 py-4">XML</td>
                                    <td class="px-6 py-4">XML</td>
                                </tr>
                                <tr class="border-b hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">性能</td>
                                    <td class="px-6 py-4 text-green-600 font-semibold">增量构建最快</td>
                                    <td class="px-6 py-4">较慢</td>
                                    <td class="px-6 py-4">最慢</td>
                                </tr>
                                <tr class="border-b hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">灵活性</td>
                                    <td class="px-6 py-4 text-green-600 font-semibold">极高</td>
                                    <td class="px-6 py-4">低（约定优先）</td>
                                    <td class="px-6 py-4">高</td>
                                </tr>
                                <tr class="border-b hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">依赖管理</td>
                                    <td class="px-6 py-4 text-green-600 font-semibold">强</td>
                                    <td class="px-6 py-4">强</td>
                                    <td class="px-6 py-4">需手动管理</td>
                                </tr>
                                <tr class="border-b hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">多项目构建</td>
                                    <td class="px-6 py-4 text-green-600 font-semibold">优秀</td>
                                    <td class="px-6 py-4">一般</td>
                                    <td class="px-6 py-4">困难</td>
                                </tr>
                                <tr class="hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">插件生态</td>
                                    <td class="px-6 py-4 text-green-600 font-semibold">丰富</td>
                                    <td class="px-6 py-4">丰富</td>
                                    <td class="px-6 py-4">有限</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </section>

        <!-- 第二部分：核心概念 -->
        <section class="mb-16 fade-in" style="animation-delay: 0.2s">
            <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                <h2 class="text-4xl font-bold mb-8 gradient-text flex items-center">
                    <i class="fas fa-cube mr-4"></i>2. Gradle核心概念
                </h2>
                
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-gradient-to-br from-blue-50 to-indigo-100 rounded-xl p-6 card-hover">
                        <h3 class="text-xl font-semibold mb-3 text-indigo-800 flex items-center">
                            <i class="fas fa-project-diagram mr-2"></i>Project